package by.msokoloff.javaweb2015.datamodel;

import java.math.BigDecimal;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

@Entity
@Table(name = "airport")
public class Airport extends AbstractEntity {

	@ManyToOne
	private City city;

	@Column(nullable = false)
	private String iataCode;

	@Column(nullable = false)
	private String name;

	@Column(nullable = false)
	private BigDecimal taxes;

	public City getCity() {
		return city;
	}

	public void setCity(City city) {
		this.city = city;
	}

	public String getIataCode() {
		return iataCode;
	}

	public void setIataCode(String iataCode) {
		this.iataCode = iataCode;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public BigDecimal getTaxes() {
		return taxes;
	}

	public void setTaxes(BigDecimal taxes) {
		this.taxes = taxes;
	}

	@Override
	public String toString() {
		return "[Airport: " + this.getName() + "]";
	}

}
